package com.gitee.wsl.flowing.actionflow

class PipeLineFlowScopeImp(
    context: PipeLineFlowContext = PipeLineFlowContext()
): PipeLineFlowImp(context), PipeLineFlowScope {

    override fun initContext(configContext: PipeLineFlowContext.() -> Unit) {
        configContext(context)
    }

    override fun andSubPipeLine(config: PipeLineFlowScope.() -> Unit){
        val pipeLineImp= PipeLineFlowScopeImp(context)
        config(pipeLineImp)
        all(pipeLineImp)
    }

    override fun orSubPipeLine(config: PipeLineFlowScope.() -> Unit) {
        val pipeLineImp= PipeLineFlowScopeImp(context)
        config(pipeLineImp)
        any(pipeLineImp)
    }

}